Multi-core geometry processing in a tile based rendering system

ABSTRACT

A method and an apparatus are provided for combining multiple independent tile-based graphic cores. An incoming geometry stream is split into a plurality of streams and sent to respective tile based graphics processing cores. Each one generates a separate tiled geometry list as described. These may be combined into a master tiling unit or, alternatively, markers may be inserted into the tiled geometry lists which are used in the rasterization phase to switch between tiling lists from different geometry processing cores.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No. 12/315,263, filed on Dec. 1, 2008 now U.S. Pat. No. 8,310,487, which claims priority from GB App. No. 0723536.9, filed on Nov. 30, 2007, both of which are incorporated by reference in their entirety herein for all purposes.

BACKGROUND OF THE INVENTION

This invention relates to a three-dimensional computer graphics rendering system and in particular to a method and an apparatus associated with combining multiple independent tile based graphics cores for the purpose of increasing geometry processing performance.

It is desirable to offer computer graphics processing cores at many different performance points e.g. from basic hand-held applications through to sophisticatedly dedicated graphic computers. However, the complexity of modern computer graphics makes it difficult to do this in either a timely or cost effective manner. As such, it is desirable to have a method of combining multiple independent cores such that performance may be increased without developing a whole new core.

Tile based rendering systems are well-known. These subdivide an image into a plurality of rectangular blocks or tiles. FIG. 1 illustrates an example of a tile based rendering system. A primitive/command fetch unit 101 retrieves command and primitive data from memory and passes the command and the primitive data to a geometry processing unit 102. The geometry processing unit 102 transforms the primitive and command data into screen space using well-known methods. This data is then supplied to a tiling unit 103 which inserts object data from the screen space geometry into object lists for each of a set of defined rectangular regions or tiles. An object list for each tile contains primitives that exist wholly or partially in that tile. The list exists for every tile on the screen, although some object lists may have no data in them. These object lists are fetched by a tile parameter fetch unit 105 which supplies the object lists tile by tile to a hidden surface removal unit (HSR) 106. The hidden surface removal unit (HSR) 106 removes surfaces which will not contribute to the final scene (usually because they are obscured by another surface). The HSR unit 106 processes each primitive in the tile and passes only data for visible pixels to a testing and shading unit (TSU) 108. The TSU takes the data from the HSR and uses the data to fetch textures and apply shading to each pixel within a visible object using well-known techniques. The TSU then supplies the textured and shaded data to an alpha test/fogging/alpha blending unit 110. The alpha test/fogging/alpha blending unit 110 can apply degrees of transparency/opacity to the surfaces again using well-known techniques. Alpha blending is performed using an on chip tile buffer 112 thereby eliminating the requirement to access external memory for this operation. Once each tile has been completed, the pixel processing unit 114 performs any necessary backend processing such as packing and anti-alias filtering before writing the result data to a rendered scene buffer 116, ready for display.

In British Patent No. GB2343598 there is described a process of scaling rasterization performance within a tile based rendering environment by separating geometry processing and tiling operations into a separate processor that supplies multiple rasterization cores. This method does not take into account the issues of scaling geometry processing and in particular tiling throughput across multiple parallel tile based cores.

It is commonly known that 3D hardware devices must preferably preserve the ordering of primitives with respect to the order in which they were submitted by a supplying application. For example FIG. 2 illustrates 4 triangles T1 (200), T2 (210), T3 (220) and T4 (230) that are present by the application in the order T1, T2, T3, T4 and overlap the four tiles Tile 0 (240), Tile 1 (250), Tile 2 (260) and Tile 3 (270) as shown. In order to preserve the original order of the triangles in the tile lists the triangles would be referenced in each tile list as follows. TABLE-US-00001 Tile 0 Tile 1 Tile 2 Tile 3 T1 T2 T3 T3 T2 T3 T4 T3

In order to evenly distribute load across geometry and tiling processors, the input data needs to be split across the processors either on a round-robin basis or based on the load on individual processors. However, as each processor is generating object tile lists locally, the preservation of the order in which objects are inserted into tiles requires that the order in which the processors write to the per tile object lists be controlled. This control would normally require communication between each of the GPC's (Graphics Processing Cores) present, meaning that their design would need to be changed when scaling the number of cores present.

SUMMARY OF THE INVENTION

Preferred embodiments of the present invention provide a method and an apparatus that allow a tile based rendering system to scale geometry processing and tiling performance in a linear fashion. This is accomplished by the use of a hierarchical list structure that allows chunks of incoming geometry to be processed and tiled locally within a core and for resulting region lists from each core to be linked efficiently together in an order that corresponds to the original input geometry order. Further, the mechanism employed allows multiple cores to be used in parallel with little or no required modification to each of those cores.

Preferably, embodiments of the invention provide a method and an apparatus for combining multiple independent tile based graphic cores in which an incoming geometry stream is split into a plurality of geometry streams, one per tile based graphics processing core. Each core and separate tiled geometry lists for each triangle the core processes are then combined using either a master tiling unit which takes data from the geometry processing cores to generate a master tile list for each tile preserving the input geometry order, or during rasterization processing having markers within the tiled geometry lists to have the rasterization core switch between lists.

BRIEF DESCRIPTION OF THE DRAWINGS

Preferred embodiments of the invention will now be described in detail by way of examples with reference to the accompanying drawings in which:

FIG. 1 illustrates a prior art tile based rendering system as discussed above;

FIG. 2 illustrates an example set of four triangles overlapping four tiles as described above;

FIG. 3 illustrates the splitting of a control stream across multiple cores;

FIG. 4 shows the data structure proposed for the tile reference lists in an embodiment of the invention;

FIG. 5 shows a proposed hierarchical tile list data structure in an embodiment of the invention;

FIG. 6 illustrates the splitting of control stream across multiple core at a courser granularity in an embodiment of the invention;

FIG. 7 illustrates an example implementation of a system embodying the invention;

FIG. 8 illustrates a modification to the example system of FIG. 7;

FIG. 9 illustrates the splitting of a controls team across multiple cores using Pipe Interleave Markers;

FIG. 10 shows a proposed tile list data structure in an embodiment of the invention that uses Pipe Interleave Markers;

FIG. 11 illustrates the algorithm used by a rasterization core to process multiple tile lists that are linked together using Pipe Interleave Markers;

FIG. 12 illustrates an example geometry processing system using Pipeline Interleave Marks; and

FIG. 13 illustrates an example of the front end of a tile based rasterization system capable of generating the process tile lists by a PIM based geometry system.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

FIG. 3 illustrates a simplified version of the proposed system using a master tiling unit to combine the geometry lists. In order to process incoming geometry stream 300 across multiple cores, the geometry stream 300 must first be split into separate streams, one per core by a stream splitter 310 which divides the data stream for processing across (in this example) the two geometry processing cores (GPC) 340 and 350. In this example, the incoming stream is distributed across the two cores in a simple round-robin basis. However, it is also possible to split the stream across the processing cores based on the processing load on each core. It is important to note that the stream splitter distributes control state as well as primitives to each geometry processing core. The control state contains information that instructs the hardware how to process the geometry data. For example, a matrix may be used to transform the geometry in a well known manner or details may be included regarding how texturing will be applied to the geometry. For example, the control stream for GPC0 320 contains control state 1 associated with triangles T1 through T3, and the control stream for GPC1 330 contains state 1 for T1 through T3 and state 2 for T4.

Each of the GPC's 340 and 350 generates a separate tiled geometry list 360 and 370 for each triangle that it processes. For each tile that is updated for each triangle, the GPC's insert a reference into a respective one of the tile reference lists (TRL) 365 and 375. The TRL's and the per GPC tile geometry lists form the data structures illustrated in FIG. 4, and are used by a master tiling unit 380 to produce a master tile list 390.

The TRL 400 for GPC0 contains references for triangles T1 and T3 that are processed through that core. For example, T1 is present in tile 0.0 only, and thus a reference and a pointer to the corresponding tiled geometry list 410 are included in the TRL, followed by references for T3 in all four tiles. Similarly the TRL for GPC1 420 contains references for each tile overlapped by T2 and T4 in the corresponding tiled geometry list for GPC1 430. It should be noted that the tiled triangle lists include an “End” marker after each triangle is indicated at 430.

The master tiling unit (MTU) 380 in FIG. 3 reads the TRL's in the same round-robin order that the primitives are distributed across the GPC's (in this example), taking the tile references for one triangle from each TRL before moving to the next. The MTU 380 takes the tile references and generates a master tile list 390, and this list has the data structure illustrated in FIG. 5. With a normal tile based rendering system, each tile in region headers 500 points to a corresponding tile list within the top level tile lists 510. It should be noted that these lists preserve the original presentation order of the triangles and each list has a “Terminate” master. The top level tile lists contain links to the referenced triangle lists within each tile 520 and 530 as generated by the GPC's and discussed above.

As mentioned above, each triangle in each GPC tiled list is followed by an “End” marker. These markers are used by rasterization hardware in order to instruct it to move from the GPC tile lists back to the high level tile list. The marker is used so that groups of triangles can be processed on each GPC instead of single triangles. This is important as it minimizes the amount of memory associated with the high level tile lists and allows greater decoupling of GPC's in case that the vertex processing on some triangles takes more time than others.

FIG. 6 illustrates the splitting of the incoming primitive stream from an application across multiple GPC's where blocks of 1000 triangles are pushed down to each GPC. The incoming data stream 600 contains four primitives, prim 1, 2, 3 and 4. Each primitive contains 4, 50, 2000, 1500 triangles respectively. The stream splitter 610 splits the stream into four blocks for processing across the two GPC's (650 and 660) as illustrated. Blocks 620 and 630 are passed to GPC0 and blocks 640 and 650 are passed to GPC1. Prim 1 and Prim 2 are both sent to GPC0 along with first portions of Prim 3 and Prim 4. The remaining portions of Prim 3 and Prim 4 are sent to GPC1. The purpose of the split is to attempt to balance the load between the two GPCs. In blocks 620 and 630, data from Prim 3 is also split between the two blocks, both of which are processed by GPC0. This process produces similar block sizes. The TRL and top level data structures are unchanged with the exception that instead of pointing to a single triangle, the per tile references point to groups of triangles from each block within each tile.

FIG. 7 illustrates an example of implementing a system that uses two geometry processing and tiling cores. The primitive and command fetch unit 700 reads the incoming control stream and passes it to the stream splitter unit 705 which splits the stream for processing across the two (or more) cores as described above. The splitter passes pointers to the primitives to be fetched for the separate cores, specifically the FIFO's 712 and 714 at the input to the “local” primitive fetch units 715 and 716. The FIFO's are required to help decouple the stream splitting processing from the time taken by each core in order to process each batch of the primitives. The local primitive fetch units read pointers from the FIFO's 712 and 714. The local primitive fetch units then read the actual geometry data from memory and pass it to the geometry processing units 720 and 721, which process the geometry and pass it to the local tiling units 725 and 726. The tiling units tile the processed geometry generated by local tiled lists 730 and 731, and pass TRL's for these lists into tile reference FIFO's 740 and 741 which buffer the previously described TRL's while waiting to be consumed by the master tiling unit (MTU) 750. It should be noted that these FIFO's can be contained either in external memory or on chip, allowing significant flexibility in the amount of buffering between the GPC's and the master tiling unit. The use of a FIFO/buffer allows the GPC's to be decoupled from the operation of the MTU, and this minimizes stalls in case that the MTU spends a significant amount of time generating the master tile lists. The MTU uses the TRL data from the FIFO's to generate the master region lists 760, which form the data structure together with the local tile lists as described above.

Using a simple round-robin scheme means that filling up either of the split stream FIFO's 712 or 714 due to one GPC takes significantly longer than the other GPC that the stream splitter will stall. As such, in the case of significant imbalance in processing time, these FIFO's may need to be significantly larger in order to prevent any of the GPC pipelines from being idle. FIG. 8 depicts an alternative embodiment in which the splitter sends groups of primitives to each core based on how busy that core is. The processing load of each core is monitored. The operation of the system is identical to one described above with the exception that the stream splitter 805 is fed with information from the geometry processing units 820 and 821 which indicates how busy they are, for example the fullness of input buffering. The stream splitter uses this information to direct groups of primitives to the GPC which is least heavily loaded. As the order which primitives will be submitted to the cores is now non-deterministic, the stream splitter must generate a core reference sequence for the MTU so that it can pull the TRL's from the TRL FIFO's in the correct order. The reference sequence is written into a Service Order FIFO 870 by the stream splitter which the MTU reads in order to determine which TRL FIFO is to be read next.

FIG. 9 illustrates a system that allows the geometry to be processed across multiple cores using “Pipe Interleave Markers” instead of a master tiling unit. Like the master tiling unit based system, the incoming geometry stream data is split by the stream splitter 910 and distributed to the GPCs 940, 950 as described above. Each GPC generates its own tiled geometry lists 960 and 970. FIG. 10 illustrates the structure of the tile geometry lists. Each GPC generates its own region headers 1000 and 1020 which point to the tiled geometry lists 1010 and 1030. Like the normal tile based rendering system, the geometry passes through each core. At the end of each geometry block, a GPC inserts a “Pipe Interleave Market” (PIM) 1040 which is used during the rasterization process to enable traversal of the lists in the correct order by a single core.

The flow chart in FIG. 11 illustrates how the rasterization uses the PIM markers to traverse the lists. At the start of processing each tile, the contents of the region headers generated by each core are loaded into a core list pointer array at 1100. This results in each entry within the array containing a pointer to the region list generated for each core of the region being processed. Processing of the region lists starts assuming that the first block of primitive data was processed by the first GPC i.e. GPC0 by setting an index into the array to 0 at 1105. The pointer value is then tested at 1110 to see if it is zero. If it is zero, it means the list is either empty or has already been processed to completion. The array index is incremented at 1115 and the test performed at 1110 is repeated. This process is repeated until a list that contains geometry is found where point data is fetched at 1120 from the tiled geometry list using the point indexed by the array index. At 1125, the fetched data is tested to determine if it is a PIM. If it is a PIM, then the current list pointer is updated to point to the next data in the tiled geometry list and written back into the core list pointer array at 1130. The array index is then set to the value specified within the PIM at 1135, and the processing jumps back to 1110. If the test at 1125 does not detect a PIM, the fetched data is tested to see if it is an End market at 1140. If an end is detected, then processing of the current tile has completed and the hardware will move onto processing the next tile. If the data is not an end marker, then it is a geometry or state reference and is processed at 1145 as necessary. The list pointer is then updated at 1150 and processing returns to 1120 to fetch the next entries within the tiled geometry list.

FIG. 12 illustrates an example of an implementation of a PIM based system that uses two geometry processing and tiling cores. The primitive and command fetch unit 1200 reads the incoming control stream and passes it to the stream splitter unit 1205 which splits the stream for processing across the two (or more) cores as described above. The splitter passes pointers to the primitives to be fetched to the separate cores, specifically the FIFO's 1212 and 1214 at the input to the “local” primitive fetch units 1215 and 1216. The FIFO's are required to help decouple the stream splitting processing from the time taken by each core to process each batch of primitives. The local primitive fetch units read the actual geometry data from memory and pass it to the geometry processing units 1220 and 1221, which process the geometry and pass it to the tiling units 1225 and 1226. The tiling units tile the processed geometry generated by the per core tile lists 1230 and 1231.

FIG. 13 illustrates the front end of the rasterization core capable of traversing tile lists generated by multiple GPC's using PIMs. The region header fetch unit 1310 reads the region headers from the screen space tiled geometry lists 1300 generated by each GPC and writes the resulting lists pointers into the core list pointer array 1320 as described in FIG. 11. The tiled geometry list fetch unit 1330 then fetches and processes the per tile control lists as described in FIG. 11, and passes resulting geometry to the hidden surface removal unit 1340. All of the processings at the hidden surface removal unit 1340 are the same as described for a normal tile based rendering system. 

I claim:
 1. A method of processing geometry for 3-D graphics rendering, comprising: distributing a stream of scene geometry data, describing elements of scene geometry, among a plurality of geometry processing units, wherein the distributing is according to a predefined convention; in each of the geometry processing units, maintaining one respective tile reference list containing a series of entries that each identify an element of scene geometry processed by that geometry processing unit, and one or more screen-space tiles, of a plurality of screen-space tiles, that the element of scene geometry overlaps, and for each tile that the element of scene geometry overlaps, a pointer to parameter information for the element within a tiled geometry list produced by that geometry processing unit; and in a tile list builder shared among the geometry processing units, reading entries from each of the tile reference lists from the plurality of geometry processing units in an order determined by the predefined convention, producing a master tile list comprising, for each screen-space tile overlapped by at least one of the elements of scene geometry, a respective list of the pointers obtained from the tile reference lists maintained by the geometry processing units that point to respective parameter information for the elements of scene geometry overlapping that screen-space tile.
 2. The method of processing geometry for 3-D graphics rendering of claim 1, wherein the predefined convention is a round-robin distribution, and the reading entries from each of the tile reference lists comprises iterative reading a single entry from each of the tile reference lists in a round-robin order following the round-robin distribution of the predefined convention.
 3. The method of processing geometry for 3-D graphics rendering of claim 1, further comprising distributing control state information for elements of scene geometry distributed among the plurality of geometry processing units.
 4. The method of processing geometry for 3-D graphics rendering of claim 1, wherein the control state information comprises one or more of geometry transformation information and texturing information.
 5. The method of processing geometry for 3-D graphics rendering of claim 1, further comprising organizing each respective tile reference list as an ordered list identifying each geometry element distributed to the geometry processing unit, followed by an identifier of each tile overlapped by that geometry element.
 6. The method of processing geometry for 3-D graphics rendering of claim 1, wherein the maintaining of the respective tile reference list in each geometry processing unit comprises providing each geometry element identifier and a respective tile identifier for each tile overlapped by the geometry element identified by that geometry element identifier.
 7. The method of processing geometry for 3-D graphics rendering of claim 1, wherein the distributing the stream of scene geometry data, describing elements of scene geometry, among the plurality of geometry processing units comprises distributing blocks of geometry data to each geometry processing unit in turn.
 8. The method of processing geometry for 3-D graphics rendering of claim 7, wherein each of the blocks comprises a plurality of triangular elements of geometry.
 9. The method of processing geometry for 3-D graphics rendering of claim 7, wherein one or more of the blocks comprises at least 1000 triangular elements of geometry.
 10. The method of processing geometry for 3-D graphics rendering of claim 1, further comprising, in each geometry processing unit and for each tile, inserting a marker into the tiled geometry list associated with that geometry processing unit for each block of geometry processed.
 11. The method of processing geometry for 3-D graphics rendering of claim 10, further comprising using the markers in the tiled geometry lists to indicate when to switch between tiled geometry lists from different graphics processing units.
 12. A system for performing tiling of 3-D geometry elements in a three dimensional graphics rendering system comprising: a plurality of geometry processing units, each operable to receive elements of scene geometry, and to produce a respective tile reference list containing a series of entries that each identify an element of scene geometry processed by that geometry processing unit and a respective identifier for each screen-space tile that the element of scene geometry overlaps and a pointer to parameter information, for the element, within a tiled geometry list produced by that geometry processing unit; and a tile list builder, coupled with each of the plurality of geometry processing units to read entries from each of the tile reference lists, and configured to produce a master tile list that comprises, for each screen-space tile overlapped by at least one of the elements of scene geometry, a respective list of the pointers obtained from the tile reference lists produced by the geometry processing units that point to the parameter information for the elements of scene geometry overlapping that screen-space tile.
 13. The system for performing geometry processing and tiling in a three dimensional graphics rendering system of claim 12, further comprising a stream splitter operable to split a stream of graphics primitives data among the plurality of geometry processing units, wherein each of the primitives comprises one or more triangular geometry elements.
 14. The system for performing geometry processing and tiling in a three dimensional graphics rendering system of claim 13, further comprising a service order feedback from the tile list builder to the stream splitter indicating how the stream of graphics primitives data should be divided among the geometry processing units.
 15. The system according to claim 12, further comprising a buffer for storing data from tile reference lists and tile geometry before input to the tile list builder.
 16. A system for performing geometry processing and tiling of 3-D scene geometry to 2-D screen-space tiling, comprising: a geometry stream splitter operable to input a stream of 3-D geometry data and split the stream of geometry data into a plurality of output streams, the stream of 3-D geometry data comprising blocks of triangles, wherein the geometry stream splitter is operable to distribute portions of a single block of triangles among multiple of the plurality of output streams; a plurality of geometry processing units, each operable to input a respective output stream from the geometry stream splitter, and each geometry processing unit operable to produce a respective tile list for each tile overlapped by at least one triangle processed by that unit, each tile list comprising entries identifying the triangles overlapping that tile with interleave markers separating each entry, and an end marker, indicating an end to the triangles processed by that geometry processing unit for that tile, and to produce a region header identifying a respective location of each tile list produced by that geometry processing element; and a rasterization unit operable to access the tile lists and to use the interleave markers as a signal to switch from a current point in one of the tiled geometry lists pertaining to a tile currently being processed to a point in a different tiled geometry list pertaining to the tile currently being processed, and to switch to a subsequent tile list identified by one of the region headers after encountering an end marker in all of the tile lists for the tile currently being processed.
 17. The system according to claim 16, further comprising a geometry stream splitter operable to split a stream of geometry data among the plurality of geometry processing units on a round robin basis.
 18. The system according to claim 16, further comprising a geometry stream splitter operable to split a stream of geometry data among the plurality of geometry processing units according to processing loads on each of the units.
 19. The system according to claim 16, further comprising a respective buffer for each geometry processing unit operable to temporarily store outputs of the geometry stream splitter until the geometry processing unit reads those outputs.
 20. The system according to claim 16, further comprising a buffer for storing data from tile reference lists and tile geometry before each geometry processing unit operable to temporarily store outputs of the geometry stream splitter until that geometry processing unit reads those outputs. 